QuickTime 3 Reference

Previous | Chapter Top | Chapter Contents | Next

Manipulating Media Input Maps

The Movie Toolbox contains two functions for maintaining media input maps: GetMediaInputMap and SetMediaInputMap .

Each track has particular attributes such as size, position, and volume associated with it. The media input map of that track describes where the variable parameters are stored so that modifier tracks know where to send their data. When a track is copied, its input map is also copied. CopyTrackSettings also transfers the media input map.

GetMediaInputMap

The GetMediaInputMap function returns a copy of the input map associated with the specified media. The caller is responsible for disposing of the input map with QTDisposeAtomContainer .

pascal OSErr GetMediaInputMap (
                     Media theMedia,
                     QTAtomContainer *inputMap);
theMedia
Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as NewTrackMedia and GetTrackMedia .
inputMap
Specifies the media input map for this operation. You must dispose of the map referred to by this parameter when you are done with it using QTDisposeAtomContainer .

DISCUSSION

Use the GetMediaInputMap function to specify the media you want to get so you can modify its input map.

RESULT CODES

invalidMedia

-2008

The media is corrupted or invalid

paramErr

-50

Invalid parameter specified

memFullErr

-108

Not enough room in heap zone

SetMediaInputMap

The SetMediaInputMap function replaces the media's existing input map with the given input map.

pascal OSErr SetMediaInputMap (
                     Media theMedia,
                     QTAtomContainer inputMap);
theMedia
Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as NewTrackMedia and GetTrackMedia .
inputMap
Specifies the media input map for this operation. If the input map is set to nil , the media's input map is reset to an empty input map.

DISCUSSION

Use the SetMediaInputMap function to specify the media you want to set so you can modify or empty its input map.

SetMediaInputMap makes a copy of the inputMap passed to it. Typically, an application will call GetMediaInputMap to get the current input map before modifying it. Use QTNewAtomContainer to create an empty input map. See the description of QTNewAtomContainer later in this chapter.

RESULT CODES

invalidMedia

-2008

The media is corrupted or invalid

paramErr

-50

Invalid parameter specified

memFullErr

-108

Not enough room in heap zone


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next